declare @tableName VARCHAR(80)
SET @tableName='tbUser'
SELECT
  CAST(clmns.colid AS int) AS FieldIndex,
  '['+clmns.[name]+'],' AS Name,
  '@'+clmns.[name]+',' AS [@Name],
  usrt.[name] AS FieldType,
  clmns.length AS FieldLen, 
  CASE CAST(clmns.isnullable AS bit) WHEN 1 THEN 'TRUE' ELSE 'FALSE' END AS FieldNullable,
  defaults.text AS FieldColumnDef,
  CASE CAST(COLUMNPROPERTY(clmns.id, clmns.[name], N'IsIdentity') AS int) WHEN 1 THEN 'TRUE' ELSE 'FALSE' END AS IsPrimaryKey,
  sys.extended_properties.[value] AS FieldRemark
FROM
  dbo.sysobjects AS tbl
  LEFT JOIN dbo.syscolumns AS clmns ON clmns.id=tbl.id
  LEFT JOIN dbo.systypes AS usrt ON usrt.xusertype = clmns.xusertype
  LEFT JOIN dbo.syscomments AS defaults ON defaults.id = clmns.cdefault
  LEFT JOIN sys.extended_properties ON 
    ( sys.extended_properties.minor_id = clmns.colid 
    AND sys.extended_properties.major_id = clmns.id) 
WHERE 1 = 1
  AND (tbl.[type] = 'U' OR tbl.[type] = 'S')
  AND tbl.[name] = @tableName
ORDER BY
  FieldIndex ASC